<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>企创宝 @yield('title')</title>
    <!-- Tell the browser to be responsive to screen width -->
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="{{asset('bootstrap/css/bootstrap.min.css')}}">
    <!-- Font Awesome -->
    <link rel="stylesheet" href="{{asset('css/font-awesome.min.css')}}">
    <!-- Ionicons -->
    <link rel="stylesheet" href="{{asset('css/ionicons.min.css')}}">
    <!-- Theme style -->
    <link rel="stylesheet" href="{{asset('css/quill.snow.css')}}">
    <link rel="stylesheet" href="{{asset('css/AdminLTE.min.css')}}">
    <link rel="stylesheet" href="{{asset('css/AdminNew.css')}}">
    <link rel="stylesheet" href="{{asset('css/bootstrap-datetimepicker.min.css')}}">
    <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
          page. However, you can choose any other skin. Make sure you
          apply the skin class to the body tag so the changes take effect.
    -->
    <link rel="stylesheet" href="{{asset('css/skins/skin-blue.min.css')}}">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="{{asset('js/html5shiv.min.js')}}"></script>
    <script src="{{asset('js/respond.min.js')}}"></script>
    <![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <!-- Main Header -->
    <header class="main-header">

        <!-- Logo -->
        <a href="#" class="logo">
            <!-- mini logo for sidebar mini 50x50 pixels -->
            <span class="logo-mini"><b>创</b></span>
            <!-- logo for regular state and mobile devices -->
            <span class="logo-lg"><b>企创宝</b></span>
        </a>

        <!-- Header Navbar -->
        <nav class="navbar navbar-static-top" role="navigation">
            <!-- Sidebar toggle button-->
            <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
            </a>
            <!-- Navbar Right Menu -->
            <div class="navbar-custom-menu">
                <ul class="nav navbar-nav">
                    <!-- User Account Menu -->
                    <li class="dropdown user user-menu">
                        <!-- Menu Toggle Button -->
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <!-- The user image in the navbar-->
                            <img src="{{$CurrentUser->avatar}}" class="user-image" alt="User Image">
                            <!-- hidden-xs hides the username on small devices so only the image appears. -->
                            <span class="hidden-xs">{{$CurrentUser->name}}</span>
                        </a>
                        <ul class="dropdown-menu">
                            <!-- The user image in the menu -->
                            <li class="user-header">
                                <img src="{{$CurrentUser->avatar}}" class="img-circle" alt="User Image">

                                <p>
                                    {{$CurrentUser->name}} - {{$CurrentUser->level == 10?"管理员":"编辑"}}
                                </p>
                            </li>
                            <!-- Menu Footer-->
                            <li class="user-footer">
                                <div class="pull-left">
                                    <a href="#" class="btn btn-default btn-flat">设置</a>
                                </div>
                                <div class="pull-right">
                                    <a href="{{ url('/logout') }}" class="btn btn-default btn-flat" onclick="event.preventDefault();  document.getElementById('logout-form').submit();">退出</a>
                                    {{--<a href="#" class="btn btn-default btn-flat">Sign out</a>--}}
                                    <form id="logout-form" action="{{ url('/logout') }}" method="POST" style="display: none;">
                                        <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    </form>
                                </div>
                            </li>
                        </ul>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside class="main-sidebar">

        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">

            {{--<!-- search form (Optional) -->--}}
            {{--<form action="#" method="get" class="sidebar-form">--}}
                {{--<div class="input-group">--}}
                    {{--<input type="text" name="q" class="form-control" placeholder="Search...">--}}
              {{--<span class="input-group-btn">--}}
                {{--<button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>--}}
                {{--</button>--}}
              {{--</span>--}}
                {{--</div>--}}
            {{--</form>--}}
            {{--<!-- /.search form -->--}}

            <!-- Sidebar Menu -->
            <ul class="sidebar-menu">
                <li class="header">HEADER</li>
                <!-- Optionally, you can add icons to the links -->
                <li class="{{Request::getPathInfo() == '/admin' ? 'active':''}}"><a href="{{url('admin')}}"><i class="fa fa-dashboard"></i> <span>管理台</span></a></li>
                <li class="treeview {{count(explode('/admin/post',Request::getPathInfo()))>1 || Request::getPathInfo()== '/admin/tag/xcx' || Request::getPathInfo()== '/admin/tag/page' || Request::getPathInfo()== '/admin/tag/tag' ? 'active':''}}">
                    <a href="#"><i class="fa fa-file"></i> <span>展示</span>
                    <span class="pull-right-container">
                      <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="{{count(explode('/admin/posts',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/posts')}}">所有页面</a></li>
                        <li class="{{count(explode('/admin/post/',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/post/new')}}">新建页面</a></li>
                        <li class="{{count(explode('/admin/tag/page',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/tag/page')}}">页面分类</a></li>
                        <li class="{{count(explode('/admin/tag/tag',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/tag/tag')}}">页面标签</a></li>
                        <li class="{{count(explode('/admin/tag/xcx',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/tag/xcx')}}">小程序分类</a></li>
                    </ul>
                </li>
                <li class="treeview {{count(explode('/admin/active',Request::getPathInfo()))>1||count(explode('/admin/shows',Request::getPathInfo()))>1? 'active':''}}">
                    <a href="#"><i class="fa fa-calendar"></i> <span>活动路演</span>
                    <span class="pull-right-container">
                      <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="{{count(explode('/admin/actives',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/actives')}}">所有活动</a></li>
                        <li class="{{count(explode('/admin/shows',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/shows')}}">在线路演</a></li>
                        <li class="{{count(explode('/admin/active/',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/active/new')}}">新建活动</a></li>
                    </ul>
                </li>
                <li class="treeview {{count(explode('/admin/service',Request::getPathInfo()))>1 || count(explode('/admin/tag/service',Request::getPathInfo()))>1 ? 'active':''}}">
                    <a href="#"><i class="fa fa-group"></i> <span>服务大厅</span>
                    <span class="pull-right-container">
                      <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="{{count(explode('/admin/services',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/services')}}">所有服务</a></li>
                        <li class="{{count(explode('/admin/service/',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/service/new')}}">新建服务</a></li>
                        <li class="{{count(explode('/admin/tag/service',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/tag/service')}}">服务分类</a></li>
                    </ul>
                </li>
                <li class="treeview {{count(explode('/admin/form',Request::getPathInfo()))>1?'active':''}}">
                    <a href="#"><i class="fa fa-star"></i> <span>预约申请</span>
                    <span class="pull-right-container">
                      <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="{{count(explode('/admin/formitem',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/formitem')}}">预约模版</a></li>
                        <li class="{{Request::getPathInfo() == '/admin/form'?'active':''}}"><a href="{{url('admin/form')}}">预约审核</a></li>
                    </ul>
                </li>
                <li class="treeview {{count(explode('/admin/shop',Request::getPathInfo()))>1||count(explode('/admin/cats',Request::getPathInfo()))>1||count(explode('/admin/goods',Request::getPathInfo()))>1||count(explode('/admin/coupons',Request::getPathInfo()))>1||count(explode('/admin/shopcode',Request::getPathInfo()))>1||count(explode('/admin/orders',Request::getPathInfo()))>1?'active':''}}">
                    <a href="#"><i class="fa fa-shopping-cart"></i> <span>商品</span>
                    <span class="pull-right-container">
                      <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="{{count(explode('/admin/shops',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/shops')}}">所有商铺</a></li>
                        <li class="{{count(explode('/admin/cats',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/cats')}}">所有分类</a></li>
                        <li class="{{count(explode('/admin/goods',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/goods')}}">所有商品</a></li>
                        <li class="{{count(explode('/admin/coupon',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/coupons')}}">所有优惠券</a></li>
                        <li class="{{count(explode('/admin/orders',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/orders')}}">所有订单</a></li>
                        <li class="{{count(explode('/admin/shopcode',Request::getPathInfo()))>1?'active':''}}"><a href="{{url('admin/shopcode')}}">所有优惠码</a></li>
                    </ul>
                </li>
                <li class="{{Request::getPathInfo() == '/admin/comment' ? 'active':''}}"><a href="{{url('/admin/comment')}}"><i class="fa fa-comments"></i> <span>评论</span></a></li>
                <li class="treeview {{count(explode('/admin/message',Request::getPathInfo()))>1?'active':''}}">
                    <a href="#"><i class="fa fa-envelope"></i> <span>私信</span>
                    <span class="pull-right-container">
                      <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="{{Request::getPathInfo() == '/admin/message' ? 'active':''}}"><a href="{{url('admin/message')}}">所有私信</a></li>
                        <li class="{{Request::getPathInfo() == '/admin/message/add' ? 'active':''}}"><a href="{{url('admin/message/add')}}">发送私信</a></li>
                    </ul>
                </li>
                @if($CurrentUser->level==10)
                <li class="treeview {{count(explode('/admin/user',Request::getPathInfo()))>1 ? 'active':''}}">
                    <a href="#"><i class="fa fa-user"></i> <span>用户</span>
                    <span class="pull-right-container">
                      <i class="fa fa-angle-left pull-right"></i>
                    </span>
                    </a>
                    <ul class="treeview-menu">
                        <li class="{{Request::getPathInfo() == '/admin/users' ? 'active':''}}"><a href="{{url('admin/users')}}">所有用户</a></li>
                        <li class="{{Request::getPathInfo() == '/admin/user/new' ? 'active':''}}"><a href="{{url('admin/user/new')}}">添加用户</a></li>
                        <li class="{{Request::getPathInfo() == '/admin/user/profile' ? 'active':''}}"><a href="{{url('admin/user/profile')}}">我的信息</a></li>
                    </ul>
                </li>
                @endif
                <li class="{{Request::getPathInfo() == '/admin/create/qr' ? 'active':''}}"><a href="{{url('admin/create/qr')}}"><i class="fa fa-link"></i> <span>二维码生成</span></a></li>
            </ul>
            <!-- /.sidebar-menu -->
        </section>
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        @section('content')
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                Page Header
                <small>Optional description</small>
            </h1>
            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
                <li class="active">Here</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">

            <!-- Your Page Content Here -->

        </section>
        @show
        <!-- /.content -->
    </div>
    <!-- /.content-wrapper -->

    <div class="control-sidebar-bg"></div>
</div>
<!-- ./wrapper -->

<!-- REQUIRED JS SCRIPTS -->
<script>'use strict';</script>
<!-- jQuery 2.2.3 -->
<script src="{{asset('js/jquery-2.2.3.min.js')}}"></script>
<!-- Bootstrap 3.3.6 -->
<script src="{{asset('bootstrap/js/bootstrap.min.js')}}"></script>
<!-- AdminLTE App -->
<script src="{{asset('js/app.min.js')}}"></script>

@section('js')
@show
<!-- Optionally, you can add Slimscroll and FastClick plugins.
     Both of these plugins are recommended to enhance the
     user experience. Slimscroll is required when using the
     fixed layout. -->
</body>
</html>
